home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / texsis / Unix / TEXSIS02 / TXSsymb.tex < prev    next >
Text File  |  1992-08-02  |  7KB  |  169 lines

  1. % file: TXSsymb.tex                              TeXsis version 2.15
  2. % $Revision: 15.2 $  :  $Date: 92/05/31 21:37:09 $  :  $Author: myers $
  3. %======================================================================*
  4. % EXTENDED MATH SYMBOLS FOR PHYSICS
  5. %       
  6. %       This file defines extensions to the symbols in Plain TeX that are
  7. % generally useful for physics papers, espacially for high energy physics.
  8. % See the comments for each definition.
  9. %-----------------------------------------------------------------------*
  10. \message{Extended math/physics symbols.}
  11. \newdimen\vbigd@men                             % for \vbig
  12.  
  13. %       Vertical bars
  14. \def\|{\ifmmode\Vert\else \char`\|\fi}
  15.  
  16. %       Raise \chi and \zeta so they do not have descenders. This looks
  17. % better in formulae (I think -EAM).
  18.  
  19. \ifx\oldzeta\undefined                          % hasn't been done yet, so 
  20.   \let\oldzeta=\zeta                            % save old definiton
  21.   \def\zzeta{{\raise 2pt\hbox{$\oldzeta$}}}%    % make new definition
  22.   \let\zeta=\zzeta                              % and attatch it
  23. \fi
  24.  
  25. \ifx\oldchi\undefined                           % hasn't been done yet, so 
  26.   \let\oldchi=\chi                              % save old definiton
  27.   \def\cchi{{\raise 2pt\hbox{$\oldchi$}}}%      % make new definition
  28.   \let\chi=\cchi                                % and attatch it
  29. \fi
  30.  
  31. \def\sterling{{\hbox{\it\char'44}}}
  32.  
  33. %==================================================*
  34. % Various special symbols:
  35.  
  36. % ---------- Gradient, partial, laplacian, etc...
  37.  
  38. \def\square{\hbox{{$\sqcup$}\llap{$\sqcap$}}}   % box laplacian
  39. \def\grad{\nabla}                               % synonym for the gradient
  40. \def\del{\partial}                              % synonym for \partial
  41.  
  42. % ---------- Fractions.
  43.  
  44. \def\frac#1#2{{\textstyle{#1\over#2}}}
  45.  
  46. \def\smallfrac#1#2{{\scriptstyle {#1 \over #2}}}
  47.  
  48. \def\half{\ifinner {\scriptstyle {1 \over 2}}%
  49.    \else \frac{1}{2}\fi}
  50.  
  51. % ---------- Bras, kets and vev's
  52.  
  53. \def\bra#1{\langle#1\vert}              % \bra{stuff} gives <stuff|
  54. \def\ket#1{\vert#1\/\rangle}              % \ket{stuff} gives |stuff>
  55. \def\vev#1{\langle{#1}\rangle}          % \vev{stuff} gives <stuff>
  56.  
  57.  
  58. %       \simge and \simle make the "greater than about" and the "less
  59. % than about" symbols with spacing as relations.
  60.  
  61. \def\simge{%  ``greater than about'' symbol
  62.     \mathrel{\rlap{\raise 0.511ex 
  63.         \hbox{$>$}}{\lower 0.511ex \hbox{$\sim$}}}}
  64.  
  65. \def\simle{%  ``less than about'' symbol
  66.     \mathrel{\rlap{\raise 0.511ex 
  67.         \hbox{$<$}}{\lower 0.511ex \hbox{$\sim$}}}}
  68.  
  69. \def\gtsim{\simge}                              % synonym for \simge
  70. \def\ltsim{\simle}                              % synonym for \simle
  71.  
  72.  
  73.  
  74. %       \parenbar puts a bar in small parentheses over a character to
  75. % indicate an optional antiparticle. \nunubar and \ppbar are special
  76. % cases.
  77.  
  78. \def\parenbar#1{{\null\!                        % left-hand spacing
  79.    \mathop{\smash#1}\limits%                    % superscript above
  80.    ^{\hbox{\fiverm(--)}}%                       % 5pt type
  81.    \!\null}}                                    % right-hand spacing
  82.  
  83. \def\nunubar{\parenbar{\nu}}
  84. \def\ppbar{\parenbar{p}}
  85.  
  86. %       \buildchar makes a compound symbol, placing #2 above #1 and #3
  87. % below it with \limits. \overcirc is a special case.
  88.  
  89. \def\buildchar#1#2#3{{\null\!                   % \null, cancel space
  90.    \mathop{\vphantom{#1}\smash#1}\limits%       % #1 with spacing and
  91.    ^{#2}_{#3}%                                  %   #2 above, #3 below
  92.    \!\null}}                                    % cancel space, \null
  93.  
  94. \def\overcirc#1{\buildchar{#1}{\circ}{}}
  95.  
  96. %  \slashchar puts a slash through a character to represent contraction
  97. %  with Dirac matrices. 
  98.  
  99. \def\slashchar#1{\setbox0=\hbox{$#1$}           % set a box for #1 
  100.    \dimen0=\wd0                                 % and get its size
  101.    \setbox1=\hbox{/} \dimen1=\wd1               % get size of /
  102.    \ifdim\dimen0>\dimen1                        % #1 is bigger
  103.       \rlap{\hbox to \dimen0{\hfil/\hfil}}      % so center / in box
  104.       #1                                        % and print #1
  105.    \else                                        % / is bigger
  106.       \rlap{\hbox to \dimen1{\hfil$#1$\hfil}}   % so center #1
  107.       /                                         % and print /
  108.    \fi}                                         %
  109.  
  110. %       \subrightarrow#1 puts the text #1 under an arrow of the 
  111. % appropriate length.
  112.  
  113. \def\subrightarrow#1{%                          % #1 under arrow
  114.   \setbox0=\hbox{%                              % set a box
  115.     $\displaystyle\mathop{}%                    % no mathop
  116.     \limits_{#1}$}%                             % just limits
  117.   \dimen0=\wd0%                                 % get width
  118.   \advance \dimen0 by .5em%                     % add a bit
  119.   \mathrel{%                                    % space like =
  120.     \mathop{\hbox to \dimen0{\rightarrowfill}}% % arrow to width
  121.        \limits_{#1}}}                           % text below
  122.  
  123. % \vbig produces very (or variably) big delimiters. The syntax is
  124. % \vbigl<delim><size> or \vbigr<delim><size>, where <delim> is any delimiter
  125. % and <size> is any valid dimension in pt, cm, in,.... There is also a 
  126. % \vbigm for (middle) relations.
  127.  
  128. \def\vbigl{\mathopen\vbig}
  129. \def\vbigm{\mathrel\vbig}
  130. \def\vbigr{\mathclose\vbig}
  131.  
  132. \def\vbig#1#2{{\vbigd@men=#2\divide\vbigd@men by 2%
  133. \hbox{$\left#1\vbox to \vbigd@men{}\right.\n@space$}}}
  134.  
  135. % \Leftcases and \Rightcases are just \vbig \{ or \} with \smash. These
  136. % can be used to make constructions like \cases with a nuumber on each
  137. % line, but the spacing is NOT automatic.
  138.  
  139. \def\Leftcases#1{\smash{\vbigl\{{#1}}}
  140. \def\Rightcases#1{\smash{\vbigr\}{#1}}}
  141.  
  142. % ---------- Functions -- all defined like \sin, etc. in Plain TeX:
  143. \def\real{\mathop{\rm Re}\nolimits}     % Re for real part
  144. \def\imag{\mathop{\rm Im}\nolimits}     % Im for imaginary part
  145.  
  146. \def\tr{\mathop{\rm tr}\nolimits}       % tr for trace
  147. \def\Tr{\mathop{\rm Tr}\nolimits}       % Tr for functional trace
  148. \def\Det{\mathop{\rm Det}\nolimits}     % Det for functional determinant
  149.  
  150. \def\mod{\mathop{\rm mod}\nolimits}     % mod for modulo
  151. \def\wrt{\mathop{\rm wrt}\nolimits}     % wrt for with respect to
  152.  
  153. % ---------- Abbreviations for units
  154.  
  155. \def\TeV{{\rm TeV}}                     % 10^12 electron volts
  156. \def\GeV{{\rm GeV}}                     % 10^9  electron volts
  157. \def\MeV{{\rm MeV}}                     % 10^6  electron volts
  158. \def\KeV{{\rm KeV}}                     % 10^3  electron volts
  159. \def\eV{{\rm eV}}                       % 1     electron volt
  160.  
  161. \def\mb{{\rm mb}}                       % 10^-27 cm^2
  162. \def\mub{\hbox{$\mu$b}}                 % 10^-30 cm^2
  163. \def\nb{{\rm nb}}                       % 10^-33 cm^2
  164. \def\pb{{\rm pb}}                       % 10^-36 cm^2
  165.  
  166. \def\cmsec{{\rm cm^{-2}sec^{-1}}}       % cm^-2sec^-1 for luminosity
  167.  
  168. % >>> EOF TXSsymb.tex <<<
  169.